package app.netant.finishbook.shumi6;

import org.jsoup.nodes.Element;

import cn.lily.com.enviroment.Enviroment;
import app.netant.book.base.BaseDetail;
import app.netant.book.base.BaseEntity;
import app.netant.book.base.BasePage;

public class Shumi6Page extends BasePage {

	public Shumi6Page(String netSite) {
		super(netSite);
		this.tableKey = "shumi6";
		this.selectKey = "#content .novellost .con .nlblock dl dd h4 a";
		this.preHref = "https://www.shumi6.com";
	}

	@Override
	public String buildHref(Element element) {
		String href = element.attr("href");
		if(href.startsWith("/")){
			href = this.preHref + href;
		}
		return href;
	}

	@Override
	public BaseEntity buildEntity() {
		return new Shumi6Entity();
	}

	@Override
	public BaseDetail buildDetail(String href) {
		return new Shumi6Detail(href);
	}

	@Override
	public void afterEntity(BaseEntity entity, Element element) {
		
	}

	
	public static void main(String[] args) {
		Enviroment.createEnv();
		Enviroment.getEnv().getLogBean().beginLog();
		Shumi6Page page = new Shumi6Page("https://www.shumi6.com/fenlei/1_1.html");
		page.analyseHref();
	}
	
}
